package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SpokenTeacherCourseTime;
import com.ruoyi.system.mapper.SpokenTeacherCourseTimeMapper;
import com.ruoyi.system.service.ISpokenTeacherCourseTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpokenTeacherCourseTimeServiceImpl implements ISpokenTeacherCourseTimeService {

    @Autowired
    SpokenTeacherCourseTimeMapper teacherCourseTimeMapper;

    @Override
    public int insert(List<SpokenTeacherCourseTime> teacherCourseTimes) {
        return teacherCourseTimeMapper.insert(teacherCourseTimes);
    }

    @Override
    public List<SpokenTeacherCourseTime> selectByTeacherId(Long teacherId) {
        return teacherCourseTimeMapper.selectByTeacherId(teacherId);
    }

    /**
     * 根据教师ID和星期查询教师时间段
     * @param teacher
     * @param day
     * @return
     */
    @Override
    public List<SpokenTeacherCourseTime> selectByTeacherIdAndDay(Long teacher, String day) {
        return teacherCourseTimeMapper.selectByTeacherIdAndDay(teacher, day);
    }
}
